<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>广东国防教育学会</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" />
		<link rel="stylesheet" href="http://idangero.us/swiper/dist/css/swiper.min.css" />
		<link rel="stylesheet" href="/Public/Home/activity/css/style.css" />
	</head>
	<body>

	<nav class="bar bar-tab">
			<a class="tab-item open-indicator <?php if($active == 'home'): ?>active<?php endif; ?>"  href="/">
				<span class="icon icon-home"></span>
				<span class="tab-label">首页</span>
			</a>
			<a class="tab-item open-indicator" href="<?php echo U('Apply/apply');?>">
				<span class="icon iconfont icon-category"></span>
				<span class="tab-label">师资</span><!--专家预约-->
			</a>
			<a class="tab-item open-indicator" <?php if($active == 'user_company'): ?>active<?php endif; ?>" href="<?php echo U('UserCompany/index');?>">
				<span class="icon iconfont icon-huiyuan1"></span>
				<span class="tab-label">机构</span><!--会员单位-->
			</a>
			<a class="tab-item open-indicator <?php if($active == 'user'): ?>active<?php endif; ?>"   href="<?php echo U('Serve/serve_index');?>">
				<span class="icon iconfont icon-account"></span>
				<span class="tab-label">保障</span><!--我的-->
			</a>
		</nav>

<div class="bar bar-nav">
    <div class="user_tab text-center buttons-row">
        <a class="tab-link button button-round active" href="#tabs_1">参与者</a>
        <a class="tab-link button button-round" href="#tabs_2">主办方</a>
    </div>
    <i class="icon icon-left" onclick="window.history.go(-1);"></i>
    <a href="<?php echo U('message');?>"><i class="icon icon-message pull-right" style="color: #0894ec;font-weight: bold;">
        <?php echo ((isset($message_count) && ($message_count !== ""))?($message_count):"0"); ?></i></a>

</div>
<div class="content">
    <div class="row">

        <div class="col-100">
            <div class="user_top">
                <div class="user_img pull-left">
                    <img src="<?php echo (session('headimgurl')); ?>">
                </div>
                <a href="<?php echo U('usersDetail');?>">
                    <span class="pull-right icon icon-right"></span>
                </a>
                <div class="user_text">
                    <h3><?php echo (session('nickname')); ?></h3>
                    <p><span>[ <?php switch($users['user_type']): case "1": ?>游客<?php break;?>
										    <?php case "2": ?>正式会员<?php break;?>
										    <?php case "3": ?>副会长<?php break;?>
										    <?php case "4": ?>理事<?php break;?>
										    <?php case "5": ?>国旗文化<?php break;?>
										    <?php case "6": ?>军事运动<?php break;?>
										    <?php case "7": ?>国防传媒<?php break;?>
										    <?php case "8": ?>军事警觉<?php break; endswitch;?> ]
                                                                                 <?php if($users['expert_type']): ?>&nbsp;[
                                                                                 <?php switch($users['expert_type']): case "1": ?>军事专家<?php break;?>
										    <?php case "2": ?>国防专家<?php break;?>
										    <?php case "3": ?>医学专家<?php break; endswitch;?>&nbsp;]<?php endif; ?>
							 </span>
                    </p>

                </div>
            </div>
        </div>
        <div class="col-100 tabs" style="margin-top:.5rem;">
            <div class="user_txt tab active" id="tabs_1">
                <div class="user_order">
                    <div class="user_order_title">
                        我的订单<span class="pull-right open-indicator"><a href="<?php echo U('my_order');?>">全部订单</a><i
                            class="icon icon-right"></i></span>
                    </div>
                    <div class="user_order_txt">
                        <ul>
                            <li><a href="<?php echo U('my_order');?>"><span><?php echo ($order_count[0]); ?></span>
                                <p>待付款</p></a></li>
                            <li><a href="<?php echo U('my_order');?>"><span><?php echo ($order_count[1]); ?></span>
                                <p>待参与</p></a></li>
                            <li><a href="<?php echo U('my_order');?>"><span><?php echo ($order_count[2]); ?></span>
                                <p>己完成</p></a></li>
                        </ul>
                    </div>
                </div>
                <div class="user_list list-block">
                    <ul>
                        <li>
                            <a href="<?php echo U('collect');?>" class="item-link item-content">
                                <div class="item-media"><i class="icon iconfont icon-favorite"></i></div>
                                <div class="item-inner">
                                    <div class="item-title open-indicator">我的关注</div>
                                </div>
                            </a>
                        </li>
                        <li>
                            <a href="#" class="item-link item-content">
                                <div class="item-media"><i class="icon iconfont icon-gifts"></i></div>
                                <div class="item-inner">
                                    <div class="item-title">我的奖品</div>
                                </div>
                            </a>
                        </li>
                        <li>
                            <a href="answer.html#router3" class="item-link item-content">
                                <div class="item-media"><i class="icon iconfont icon-mingcheng"></i></div>
                                <div class="item-inner">
                                    <div class="item-title">我的成绩</div>
                                </div>
                            </a>
                        </li>
                        <!--						         <li>
                                                            <a href="user_expert_yuyue.html" class="item-link item-content">
                                                              <div class="item-media"><i class="icon iconfont icon-add"></i></div>
                                                              <div class="item-inner">
                                                                <div class="item-title">发布预约</div>
                                                              </div>
                                                            </a>
                                                         </li>-->
                        <li>
                            <a href="<?php echo U('Apply/expert_discuss');?>" class="item-link item-content">
                                <div class="item-media"><i class="icon iconfont icon-clock"></i></div>
                                <div class="item-inner">
                                    <div class="item-title">我的预约</div>
                                </div>
                            </a>
                        </li>
                        <?php if($is_apply): ?><li>
                            <a href="<?php echo U('my_apply');?>" class="item-link item-content">
                                <div class="item-media"><i class="icon iconfont icon-edit"></i></div>
                                <div class="item-inner">
                                    <div class="item-title">会员申请
                                        &nbsp;<?php if($shwo_apply_message): ?><i
                                                class="icon icon-message pull-right"
                                                style="color: #0894ec;font-weight: bold;"></i><?php endif; ?>
                                    </div>

                                </div>
                            </a>
                        </li><?php endif; ?>
                        <li>
                            <a href="<?php echo U('Apply/expert_join');?>" class="item-link item-content">
                                <div class="item-media"><i class="icon iconfont icon-edit"></i></div>
                                <div class="item-inner">
                                    <div class="item-title">专家申请</div>
                                </div>
                            </a>
                        </li>
                        <!-- <li>
                          <a href="<?php echo U('addSweep');?>" class="item-link item-content">
                            <div class="item-media"><i class="icon icon-code"></i></div>
                            <div class="item-inner">
                              <div class="item-title">添加扫码
                              </div>
                            </div>
                          </a>
                       </li>-->
                    </ul>
                </div>
            </div>
            <div class="user_txt tab" id="tabs_2">
                <div class="user_order">
                    <div class="user_order_txt user_cbf">
                        <ul>
                            <li><a href="<?php echo U('Users/releaseActivity');?>"><span class="iconfont icon-fenxiang"></span>
                                <p>发布活动</p></a></li>
                            <li><a href="<?php echo U('Users/activity_administration');?>"><span class="iconfont icon-edit"></span>
                                <p>活动管理</p></a></li>
                            <li><a href="<?php echo U('addSweep');?>"><span class="iconfont icon-mingcheng"></span>
                                <p>添加扫码</p></a></li>
                            <li><a href="<?php echo U('Users/user_expert_yuyue');?>"><span class="iconfont icon-fenxiang"
                                                                                style="color: #65a7f2;"></span>
                                <p>发布预约</p></a></li>
                            <li><a href="<?php echo U('Users/user_apply_order');?>"><span class="iconfont icon-edit"
                                                                               style="color: #85da38"></span>
                                <p>预约管理</p></a></li>
                            <li><a href="<?php echo U('Apply/expert_join');?>"><span class="iconfont icon-mingcheng"
                                                                          style="color: #ea68a2"></span>
                                <p>专家申请</p></a></li>
                        </ul>
                    </div>
                </div>

                <div class="in_hot_box activity_1" id="new_ul">
                    <div class="card-title">最新活动</div>
                    <?php if(is_array($new)): foreach($new as $k=>$new): ?><div class="card demo-card-header-pic">
                        <a href="/ActivityDetail/index?activity_id=<?php echo ($new['id']); ?>&city=<?php echo ($new['city']); ?>">
                            <div valign="bottom" class="card-header color-white no-border no-padding">
                                <img class='card-cover' src="<?php echo ($new['activity_img']); ?>" alt="">
                            </div>
                            <div class="card-content">
                                <div class="card-content-inner">
                                    <p class="hot_list_title"><?php echo ($new['activity_name']); ?></p>
                                    <p class="color-gray"><?php echo (date("Y-m-d",$new['start_time'])); ?> 至
                                        <?php echo (date("Y-m-d",$new['end_time'])); ?></p>
                                    <p class="color-gray">
                                        <span><?php echo ($new['area']); ?></span><span><?php echo ($new['signup_number']); ?>人已报名</span><span>￥<?php echo ($new['price']); ?></span>
                                    </p>
                                </div>
                            </div>
                        </a>
                    </div><?php endforeach; endif; ?>
                </div>
                <?php if($new_activity): ?><div class="infinite-scroll-preloader" style="display:none;">
                    <div class="preloader"></div>
                </div>
                <p onclick="ajax_sourch_submit();" id="load_more"><span class="icon icon-down"></span> 点击加载更多...</p>
                <?php else: ?>
                <p id="load_more"> 暂无数据！</p><?php endif; ?>
            </div>
        </div>
    </div>
</div>

		<script type="text/javascript" src="http://g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
		<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
		<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
		<script src="http://idangero.us/swiper/dist/js/swiper.min.js"></script>
		<script type="text/javascript" src="/Public/Home/activity/js/huodon.js" ></script>
		<script>
			
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true,
				loop:true,    
				grabCursor: true,
				autoplay: 3000
			});
			
			 /* $(document).on('click','.open-preloader', function () {
				 Zepto.showPreloader('加载中...')
				    setTimeout(function () {
				    	 Zepto.hidePreloader();
				    }, 2000); 
			 }); */
			 $(document).on('click','.open-indicator', function () {
				 Zepto.showIndicator();
			     setTimeout(function () {
			    	Zepto.hideIndicator();
			     }, 2000);
			  });
		</script>
		

	</body>

</html>

<script>
    //Zepto.toast('操作成功，正在跳转...', 2000, 'success top');
    var page = 1;
    /*** ajax 提交表单 查询订单列表结果*/
    function ajax_sourch_submit() {
        $(".infinite-scroll-preloader").show();
        page += 1;
        $.ajax({
            type: "GET",
            //url:"/index.php?m=Mobile&c=User&a=collect_list&is_ajax=1&p="+page,//+tab,
            url: "/Users/newActivity/is_ajax/1/p/" + page,//+tab,
//			data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
            success: function (data) {
                $(".infinite-scroll-preloader").hide();
                if ($.trim(data) == '') {
                    $('#load_more').hide();
                } else {
                    $("#new_ul").append(data);
                }
            }
        });
    }
</script>